<template>
	<div>
	    <div style="padding: 30px 10px 30px;">
	    	<div class="title">
	    		{{data.userNickname}}
	    	</div>
	    	<div class="content">
	    		<div class="desc">来集市{{difference}}天了，卖出过{{userInfo.sellOutCount}}件宝贝。
	    			<span v-if="userInfo.address">现居{{userInfo.address}}。</span> 
	    			<span v-if="userInfo.birthYear">{{userInfo.birthYear}}后女生。</span> 
	    		</div>
	    		<div>
	    			<img :src="data.avatar" alt="" style="width: 60px;height: 60px;border-radius: 5px;"  v-if="data.avatar"/>
	    			<img src="../../../../static/img/lanhu/45.png" alt="" v-else style="width: 60px;height: 60px;border-radius: 5px;"/>
	    		</div>	    		
	    	</div>
	    </div>	    	    
	</div>	
</template>

<script>
export default {	
	data() {
       return {
          userInfo:{},
          url1:this.$api+'/marketorderservice/api/v1/market/userManager/goods',
          userId:'',
          difference:''
       }
	},	
    props:['data'],	
	methods: {	
		format(str){
		  var time=new Date().getTime()
		  var time2=new Date(str).getTime()
		  
		  
		},
	    getData(){
	      	let that=this	      	
		    this.$Axios3.Get(this.url1+'/'+this.userId)
		    .then(function(res) {
               that.userInfo=res.data
			   let time1=new Date().getTime()
			   let time2=new Date(res.data.resigerTime).getTime()      
			   that.difference=parseInt((time1-time2)/1000/60/60/24)
			   
		    })		    	
	    },   
	},
	mounted() {
		this.userId=this.$router.currentRoute.query.userId;		
		this.getData()
	}
}	
</script>

<style scoped="">
.title{font-size: 15px;font-weight: bold;margin-bottom: 6px;}
.content{display: flex;justify-content: center;align-items: center;}
.desc{flex: 1;padding-right: 20px;font-size: 13px;line-height: 1.8;color: #333;}
</style>